Repository navigation
Conversation
Predicates silently rejected *big.Int values, so any rule on a uint256 amount (e.g. "value >= 1_000_000 * 1e6") never fired. Numeric comparisons now use big.Rat and are exact; quoted and mixed-case hex addresses compare correctly. Without abi_dirs, the synthetic event treated every argument as non-indexed and unnamed, so ERC-20 Transfer logs failed to decode. Indexed arguments are now inferred from the log's topic count, and well-known events (ERC-20/721/1155) get named args; others use argN. Whitespace in event signatures no longer changes topic0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The README quickstart rule (USDC Transfer,
value >= 1_000_000 * 1e6, noabi_dirs) could never fire, for two independent reasons:*big.Intvalues. The EVM decoder yields*big.Intforuint256, buttoNumberhad no case for it and returned "not a number", so every numeric predicate on an EVM amount evaluated to false. Existing tests only usedint, so this went unnoticed.from/toin topics, onlyvaluein data) unpacking failed, and even on success there was novaluekey.What changed
internal/engine/predicate.gobig.Rat: exact for the fulluint256/int256range (float64 treated1e24 + 1 == 1e24).*big.Intand all sized int/uint types.to != 0x000…stays a string comparison.sender == "0x…"used to compare against the quotes too) and compares0xstrings case-insensitively (checksummed vs lowercase), includinginlists.internal/source/evm/matcher.goTransferapart.from/to/value,tokenId, Approval, ApprovalForAll, ERC-1155 TransferSingle); anything else getsarg0,arg1, ….Also included:
ci: install syft via install script— a pendingrelease.ymlchange that was in the working tree, kept as its own commit. It runs syft's install script frommainviacurl | sh(not version-pinned); drop the commit if you'd rather not ship it here.Reviewer notes
abi_dirs.eventsignature now error on start.Testing
internal/engine/predicate_bigint_test.go(big ints, precision, addresses, plus an end-to-end test of the README rule through matcher + predicates) andinternal/source/evm/matcher_synthetic_test.go.mainand pass here.go vet ./...andgo test ./...pass. Not exercised against a live RPC.🤖 Generated with Claude Code